﻿
namespace CompactMapper.Orm.UnitOfWork.Mappings
{
    internal abstract class CommandMappingsBase
    {
        protected readonly TablesTree TablesTree;

        protected CommandMappingsBase(TablesTree tablesTree)
        {
            TablesTree = tablesTree;
            CreateMappings();
        }

        private void CreateMappings()
        {
            CreateSpecificMappings(TablesTree);
        }

        protected abstract void CreateSpecificMappings(Tree<Table> tablesTree);
    }
}